﻿<phone:PhoneApplicationPage 
    xmlns:my="clr-namespace:TM.QWeibo.Client.UserControls"  
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"  
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="TM.QWeibo.Client.Tweet.Add"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	Orientation="Portrait"
	shell:SystemTray.IsVisible="False" BackKeyPress="PhoneApplicationPage_BackKeyPress">
    
	<!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Style="{StaticResource PageLayoutGrid}">
		<Grid.RowDefinitions>
			<RowDefinition Height="80"/>
            <RowDefinition Height="5"/>
            <RowDefinition Height="*"/>
		</Grid.RowDefinitions>
        <Grid Grid.Row="0" Style="{StaticResource AddPageTitleBgStyle}">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="400"/>
				<ColumnDefinition Width="*"/>
			</Grid.ColumnDefinitions>
			<StackPanel Orientation="Horizontal"  Grid.Column="0">
                <TextBlock Text="新微博" x:Name="tbTitle" Style="{StaticResource AddPageTitleTextStyle}"/>
                <TextBlock Text="(0)" x:Name="tbWordCount" Style="{StaticResource AddTweetWordCountStyle}"/>
            </StackPanel>
			<StackPanel Orientation="Horizontal"  Grid.Column="1" HorizontalAlignment="Right">
				<Image x:Name="imgPhotoIcon" Source="/Resource/Icons/landskape.png" Stretch="Fill" Width="30" Height="30" Visibility="Collapsed"/>
                <Image x:Name="imgGeoIcon" Source="/Resource/Icons/POI.png" Width="30" Height="30" Stretch="Fill" Visibility="Collapsed"/>
			</StackPanel>
		</Grid>
        <toolkit:PerformanceProgressBar Width="400"  Grid.Row="1"  VerticalAlignment="Bottom" HorizontalAlignment="Center" x:Name="progressBar" IsIndeterminate="False"  Style="{StaticResource PerformanceProgressBarStyle}"/>
        <StackPanel Grid.Row="2" Orientation="Vertical">
            <TextBox x:Name="txtContent" Style="{StaticResource AddTweetContentStyle}" VerticalScrollBarVisibility="Auto" GotFocus="txtContent_GotFocus" LostFocus="txtContent_LostFocus" TextChanged="txtContent_TextChanged"/>
            <CheckBox x:Name="syncToQzone" Style="{StaticResource SyncToQzone}"/>
            <TextBlock x:Name="tbTargetTweet" Style="{StaticResource AddTweetTargetStyle}"/>
        </StackPanel>
        <!--表情列表-->
        <my:FaceList x:Name="FaceSelector" />
        <!--提及用户-->
        <my:MentionUser x:Name="UserSelector" />
        <!--话题-->
        <my:HuaTi x:Name="HuatiSelector" />
        
        <!--帮助按钮，用于隐藏键盘-->
        <Button x:Name="btnHelper" Margin="0,-10,0,0" Width="1" Height="1" BorderThickness="0"/>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Opacity="0.9">
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="插入话题" x:Name="mTopic" Click="mTopic_Click"/>
				<shell:ApplicationBarMenuItem Text="清空文字" x:Name="mClearText" Click="mClearText_Click"/>
                <shell:ApplicationBarMenuItem Text="清除图片" x:Name="mClearPhoto" Click="mClearPhoto_Click" IsEnabled="False"/>
            </shell:ApplicationBar.MenuItems>
        	<shell:ApplicationBarIconButton x:Name="btnSend" IconUri="/Resource/Icons/sent.png" Text="发布" Click="btnSend_Click"/>
			<shell:ApplicationBarIconButton x:Name="btnPhoto" IconUri="/Resource/Icons/camera.png" Text="图片" Click="btnPhoto_Click"/>
			<shell:ApplicationBarIconButton x:Name="btnMentions" IconUri="/Resource/Icons/mentions.png" Text="@" Click="btnMentions_Click"/>
			<shell:ApplicationBarIconButton x:Name="btnFace" IconUri="/Resource/Icons/face.png" Text="表情" Click="btnFace_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>